#include "process.h"
void download(callback_t cb)
{
    int target = TARGET_SIZE;
    int total = 0;
    while(total <= target)
    {
        cb(total * 100.0 / target);
        usleep(STIME);
        total += DSIZE;
    }
    cb(MAX_SIZE);
    puts("");
}
int main()
{
    download(process2);
    return 0;
}
